Home Assistant beginners

I've had issues with my Hue lights for the last couple of weeks where they don't respond within HA (automations not kicking in, not responding on the dashboard).

Been driving me mad.

Turns out my parents have been popping round the house to drop things off and they've been turning the lights off at the switch.
 
Ordered some more zigbee led strips to go behind TV for the sole purpose of them changing colour based on football scores and F1 flags during races.
Ooh the flags in F1 races piques my interest. Would only be worthwhile to me if the delay after the actual flag event was less than a second or two. I was looking at this but I can't find information on pricing at the moment.
Where are you planning on pulling your flag data from?
 
Ooh the flags in F1 races piques my interest. Would only be worthwhile to me if the delay after the actual flag event was less than a second or two. I was looking at this but I can't find information on pricing at the moment.
Where are you planning on pulling your flag data from?
I'm using this for HACS https://github.com/Nicxe/f1_sensor

You can input your own delay based on the service you're using to watch F1. I'll have it up and running for the next race.
 
Last edited:
For those not interested in programming anymore (hi) here is a neat solution that although not perfect, is looking like an easy way to get into HA at a low price.


I'll update when it arrives.

ps Paul Hibberts YT channel is currently offering a discount.

 
This might be the best place for this.

I'm struggling to understand how to modify an apexchart y-axis unit size for a series entity which is inverted.

This is a simple energy usage chart, showing both electricity and gas.
980dcdda-81b2-46ac-ac8d-f3627f863a8e.png

Is there a way to change the y-axis scale for the inverted gas usage? I suspect I need to modify the following section but I'll be damned if I can work out how.
--
xaxis:
lines:
show: true
yaxis:
lines:
show: true
yaxis:
forceNiceScale: true
--
Full code here.
type: custom:apexcharts-card
update_interval: 2s
header:
show: true
title: Energy Usage
graph_span: 12h
show:
loading: false
apex_config:
chart:
height: 250px
width: 500px
grid:
show: true
strokeDashArray: 0
borderColor: "#444444"
position: back
xaxis:
lines:
show: true
yaxis:
lines:
show: true
yaxis:
forceNiceScale: true
series:
- entity: sensor.electricity
color: 0388fc
name: Electrcity
- entity: sensor.gas
color: c2c43f
name: Gas
invert: true
all_series_config:
stroke_width: 2
type: area
Any pointers?

Cheers!
 
You need to add another y-axis that's inverted, then it can have its own scale I believe.

Thanks for the link. Still cannot get it to invert underneath the electricity, as it is now treated as a separate yaxis. Perhaps it can't be done in the way I want it. Hohum.
 
Hmm ok.

Give the below a try. No idea if it'll work, it's what Chat GPT spat out :D

YAML:
type: custom:apexcharts-card
update_interval: 2s
header:
  show: true
  title: Energy Usage
graph_span: 12h
apex_config:
  chart:
    height: 250px
    width: 500px
  grid:
    show: true
    strokeDashArray: 0
    borderColor: "#444444"
    position: back
  xaxis:
    lines:
      show: true
  yaxis:
    - show: true
      title:
        text: "Electricity"
      forceNiceScale: true
    - show: true
      opposite: true
      title:
        text: "Gas"
      forceNiceScale: true
      reversed: true  # <-- this inverts the y-axis itself
series:
  - entity: sensor.electricity
    color: 0388fc
    name: Electricity
    yaxis_id: 0   # Use first y-axis
  - entity: sensor.gas
    color: c2c43f
    name: Gas
    yaxis_id: 1   # Use second (inverted) y-axis
all_series_config:
  stroke_width: 2
  type: area
 
Hmm ok.

Give the below a try. No idea if it'll work, it's what Chat GPT spat out :D

YAML:
type: custom:apexcharts-card
update_interval: 2s
header:
  show: true
  title: Energy Usage
graph_span: 12h
apex_config:
  chart:
    height: 250px
    width: 500px
  grid:
    show: true
    strokeDashArray: 0
    borderColor: "#444444"
    position: back
  xaxis:
    lines:
      show: true
  yaxis:
    - show: true
      title:
        text: "Electricity"
      forceNiceScale: true
    - show: true
      opposite: true
      title:
        text: "Gas"
      forceNiceScale: true
      reversed: true  # <-- this inverts the y-axis itself
series:
  - entity: sensor.electricity
    color: 0388fc
    name: Electricity
    yaxis_id: 0   # Use first y-axis
  - entity: sensor.gas
    color: c2c43f
    name: Gas
    yaxis_id: 1   # Use second (inverted) y-axis
all_series_config:
  stroke_width: 2
  type: area
The yaml is incorrect, Quite a bit of what it spat out is in the wrong sections. BUT I did already try a variation on this. It produces this.
48af0169-0f03-4aec-a3ed-e874dcd3347a.png

I think I'll hack about some more. Perhaps keep it all to the same yaxis and hope there is setting similar to forcing negative values in steps of 10 instead of 1000s or somesuch.
 
This might be the best place for this.

I'm struggling to understand how to modify an apexchart y-axis unit size for a series entity which is inverted.

This is a simple energy usage chart, showing both electricity and gas.
980dcdda-81b2-46ac-ac8d-f3627f863a8e.png

Is there a way to change the y-axis scale for the inverted gas usage? I suspect I need to modify the following section but I'll be damned if I can work out how.
...
Any pointers?

Cheers!
What about making a helper through the UI which inverts the gas sensor value?
 
I'll give it a whirl but I may just settle for separate graphs.
It should be fairly straightforward - create a template sensor called sensor.gas_invert or similar and add a bit of yaml along the lines of {{ states(‘sensor.gas’) | float*(-1) }}
 
I've been messing around with using Gemini ai to write some of these sensor / template setups and it seems to work really well so i'd suggest giving that a try :)
 
Back
Top Bottom