• 0 Posts
  • 4 Comments
Joined 3 years ago
cake
Cake day: July 4th, 2023

help-circle



  • I’ve found apexcharts-card to be fairly configurable and good looking. I’ve put 2 different data types on the one graph and used two axes (price left, % right). Sometimes the values get “stuck”, but a refresh fixes it.

    Example apexcharts-card using Amber energy price forecast and renewable energy %

    YAML code for my chart
    type: custom:apexcharts-card
    apex_config:
      legend:
        show: false
    graph_span: 12h
    span:
      start: minute
    yaxis:
      - id: price
        min: ~-10
        max: ~40
        decimals: 0
      - id: renewables
        opposite: true
        min: 0
        max: ~100
        decimals: 0
    header:
      show: true
      title: Amber Prices
      show_states: true
      colorize_states: true
    series:
      - entity: sensor.amber_general_forecast
        name: General Forecast
        unit: c/kWh
        color: "#3498DB"
        yaxis_id: price
        data_generator: >
          const data = [];
    
          data.push([hass.states['sensor.amber_general_price'].attributes.nem_date.replace(/0{2}$/,
          "30"), hass.states['sensor.amber_general_price'].attributes.per_kwh*100]);
    
          for(let i = 0; i <= 24; i++) {
            data.push([entity.attributes.forecasts[i].nem_date.replace(/0{2}$/, "30"), entity.attributes.forecasts[i].per_kwh*100])
          }
    
          return data.reverse();
      - entity: sensor.amber_feed_in_forecast
        name: Feed In Forecast
        unit: c/kWh
        color: "#ff9800"
        yaxis_id: price
        data_generator: >
          const data = [];
    
          data.push([hass.states['sensor.amber_feed_in_price'].attributes.nem_date.replace(/0{2}$/,
          "30"), hass.states['sensor.amber_feed_in_price'].attributes.per_kwh*100]);
    
          for(let i = 0; i <= 24; i++) {
            data.push([entity.attributes.forecasts[i].nem_date.replace(/0{2}$/, "30"), entity.attributes.forecasts[i].per_kwh*100])
          }
    
          return data.reverse();
      - entity: sensor.amber_feed_in_forecast
        name: Renewables
        yaxis_id: renewables
        unit: "%"
        color: "#2ECC71"
        data_generator: >
          const data = [];
    

  • In Australia, Woolworths got reprimanded for selling fuel at a loss. They had a deal where you could buy groceries to earn points which could get you cheaper fuel at their fuel stations. Other companies couldn’t compete, and Woolworths was only able to sustain it because the extra profit they made from selling groceries covered the loss on the fuel.

    Many companies have done similar. Uber operated at a loss for years to force taxi companies into bankruptcy, then put their prices up to higher than the taxis had been after the competition was gone.
    Comcast had very cheap internet prices in any area where Google was offering Google Fibre, but exceedingly high prices (and worse service) in areas with no competition. Google couldn’t compete on price because Comcast could afford to operate at a loss in a few areas, and Google couldn’t afford to start offering internet across the entire country during it’s startup phase.

    It could be done, but big businesses don’t play fairly. They have lots of money to spend on driving you our of business, and lots of future profits as incentive to do so.