Hue-sensors - motions aren't showing temperature

Hello - I followed all of the steps outlined here: https://github.com/robmarkcole/Hue-sensors-HASS

Some of it is working. I can see the motions state of on or off. I can’t seem to get the temperature bit working.

I’ve made the config changes, but the temperature data doesn’t come up. See below - any ideas?

configuration.yaml

# Hue-sensors
hue:
  bridges:
    - host: 10.1.30.162

sensor:
  - platform: hue

# Example template sensor
- platform: template
    sensors:
      Garage_Sensor_temperature:
      friendly_name: 'Garage temperature'
      value_template: '{{states.sensor.basement_hallway_garage_motion_sensor.attributes.temperature}}'

groups.yaml
default_view:
view: no
entities:
- group.Hue
- group.Garage_Light
- group.Lights

Garage_Light:
  name: Garage Light
  entities:
    - sensor.basement_hallway_garage_motion_sensor_temperature
    - sensor.basement_hallway_garage_motion_sensor
    - light.basement_hallway_garage

In mine they are motion_motion rather than motion_sensor, have you checked the attribute template in the dev panel?

Also your entries in your group don’t match the sensor names you’ve defined.

And finally, I think your name for the sensor has to be lowercase.

You mean the name of the sensor? Yes, in the dev panel it reads

sensor.basement_hallway_garage_motion_sensor

I’m not following. All the names are the same. What am i not seeing?

Ok - changed that. Seems to have eliminated the config validation errors too.

Still not seeing it.

According to your paste your temperature sensor is called sensor.garage_sensor_temperature

But in your group you have

sensor.basement_hallway_garage_motion_sensor_temperature

?

Hmmmm … I don’t have sensor.garage_sensor_temperature anywhere.

Do you mean

sensors:
garage_sensor_temperature:

That should go into groups.yaml like this

Garage_Light:
  name: Garage Light
  entities:
    - garage_sensor_temperature

Cause that doesn’t work.

According to your opening post you do…

The group should be

Garage_Light:
  name: Garage Light
  entities:
    - sensor.garage_sensor_temperature

Sorry - I didn’t realize that this name needed to be carried over into groups.yaml. Thank you for the patience - really appreciate it.

Did I mention I’m new to this all? :slight_smile:

So I made the change, but still no dice. I’m not receiving any errors in the config validation, but it does show up in the group view page.

Here is configuration.yaml

  - platform: template
    sensors:
      garage_sensor_temperature:
      friendly_name: 'Garage temperature'
      value_template: '{{states.sensor.basement_hallway_garage_motion_sensor.attributes.temperature}}'

Here is groups.yaml

Garage_Light:
  name: Garage Light
  entities:
    - sensor.garage_sensor_temperature
    - sensor.basement_hallway_garage_motion_sensor
    - light.basement_hallway_garage

Ha, no worries :smile:

In your dev panel do you see the sensor? Has HA randomly changed it’s name a bit (like adding an underscore to the end or something)??

The name of the sensor in the Entities section is

sensor.basement_hallway_garage_motion_sensor

I don’t get it. All the naming is correct. I think the yaml formatting is correct. No spaces, etc.

No, the temperature sensor that you’ve created - is it there?

Just realised your spacing is out on the template sensor which probably doesn’t help, should be:

- platform: template
    sensors:
      garage_sensor_temperature:
        friendly_name: 'Garage temperature'
        value_template: '{{states.sensor.basement_hallway_garage_motion_sensor.attributes.temperature}}'

Ah-ha! It’s not there. So the sensor isn’t being created.

I corrected the spacing per your recommendation and now I just keep getting config validation errors.

I’m using Notepad++. I’m using the “Tab” key. I don’t know what else to try to get the config syntax lined up right.

At least we know what the problem is. Thank you for the helping figure that out!

I even used this site: http://www.yamllint.com/ But it still doesn’t seem to give the correct output/syntax.

Delete the tabs and use spaces, 2 spaces before the hyphen on line 1, 4 spaces before sensors on line 2, 6 before garage on line 3 and 8 before the last 2 lines.

Wow - this is pretty frustrating. It’s either the statement or the formatting and I can’t tell which one is the problem.

What’s the error message?

The config validation returns

Configuration Validation
Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid.
Configuration invalid.CHECK CONFIG
Testing configuration at /config
2018-01-24 15:59:02 ERROR (SyncWorker_0) [homeassistant.util.yaml] while parsing a block mapping
  in "/config/configuration.yaml", line 1, column 1
expected <block end>, but found '-'
  in "/config/configuration.yaml", line 97, column 1
2018-01-24 15:59:02 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: while parsing a block mapping
  in "/config/configuration.yaml", line 1, column 1
expected <block end>, but found '-'
  in "/config/configuration.yaml", line 97, column 1

Line 97 begins as:

- platform: template
   sensors:
    garage_sensor_temperature:
        friendly_name: "Garage temperature"
        unit_of-measurement: °F
        value_template: "{{states.sensor.basement_hallway_garage_motion_sensor.attributes.temperature}}"

Should be unit_of_measurement not unit_of-measurement. That’s the - it’s complaining of.

1 Like

Thanks - fixed.

I’m having no luck. No matter what I do, it appears that it associates itself with the previous line and the error like below persists

Configuration invalid.
Testing configuration at /config
2018-01-24 17:16:09 ERROR (SyncWorker_0) [homeassistant.util.yaml] while parsing a block mapping
in “/config/configuration.yaml”, line 1, column 1
expected , but found ‘’
in “/config/configuration.yaml”, line 95, column 2
2018-01-24 17:16:09 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/configuration.yaml”, line 1, column 1
expected , but found ‘’
in “/config/configuration.yaml”, line 95, column 2

These are the lines
89 - 101
# Hue-sensors
hue:
bridges:
- host: 10.1.30.162
sensor:
- platform: hue

 - platform: template
    sensors:
      garage_sensor_temperature:
        friendly_name: 'Garage temperature'
        value_template: '{{states.sensor.basement_hallway_garage_motion_sensor.attributes.temperature}}'
        unit_of_measurement: °F

I think you are going to have to post your whole configuration.yaml in a code block (with any passwords redacted) so we can get your indentations and quotes correct tbh.

You need to post in code blocks so we can check spacing. Make sure there are no tabs, only spaces.