Is this right? I added it to my configuration.yaml.
binary_sensor:
- platform: workday
country: US
workdays: [mon, tues, wed, thu, fri]
I could not get his working, something about workdays: not supported, or something like that. I just wanted to make sure I had the proper formatting, it seemed pretty straightforward,
Looks right to me, but I’ve never tried this platform. If you could share the exact error message, that might help.
Thanks,
Sorry for posting without having the error message with me.
I removed it and then left for the day. It was something about the workdays section. something about data @ ,
I’ll add it back this eveing and get the exact message.
petro
(Petro)
May 10, 2018, 1:36pm
4
typically lists are denoted as:
binary_sensor:
- platform: workday
country: US
workdays:
- mon
- tues
- wed
- thu
- fri
don’t know if thats what the platform wants though.
EDIT: the documentation has it your way @ptdalen
1 Like
I believe lists can also be entered as [a, b, c]. In fact, that’s what the doc page for this platform shows.
1 Like
I did try it that way as well. Same (or very similar) error.
Sorry, will post better info tonight.
Thanks
Take the S off tues.
According to the docs the list accepts only 3 letter values for the days.
1 Like
ha! Yes, I’m sure that’s it. Thanks for the second set of eyes
Nafis
November 24, 2019, 9:17am
11
у меня не работает:
Invalid config for [sensor]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 34). Please check the docs at https://home-assistant.io/integrations/sensor/
petro
(Petro)
November 24, 2019, 12:17pm
12
your yaml spacing is wrong
Nafis
November 24, 2019, 1:45pm
13
binary_sensor:
- platform: workday
country: RU
where is the mistake?
Where is this code? In a file named sensors.yaml
that is included like this:
sensor: !include sensors.yaml
Or something like that?
If so, then in effect you have this:
sensor:
binary_sensor:
- platform: workday
country: RU
which is incorrect.
Nafis
November 24, 2019, 2:04pm
15
the configuration.yaml says:
sensor: !include sensor.yaml
the sensor.yaml says:
# система
- platform: time_date
display_options:
- 'time'
- 'date'
- platform: systemmonitor
resources:
- type: processor_use
- type: memory_free
- type: memory_use
arg: /
- platform: command_line
name: CPU Temp
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
# давление паскаль/рт.ст
- platform: template
sensors:
pressure_hg:
friendly_name: "давление"
unit_of_measurement: 'ммРс'
value_template:
"{{ (states('sensor.pressure_158d000411d3ed') | float /1.333) | round(0) }}"
# рабочая неделя
- binary_sensor:
- platform: workday
country: RU
Nafis
November 24, 2019, 2:05pm
16
the other two are working fine.
work week swears
Workday is a binary sensor. That’s different to sensor.
Take it out of your sensors.yaml and add it directly to the configuration.yaml
Markus99
(Mark)
November 24, 2019, 2:38pm
18
Here’s my workday sensor, from sensors_binary.yaml as referenced in configuration.yaml:
binary_sensor: !include sensor_binary.yaml
- platform: workday
country: US
workdays: [mon, tue, wed, thu, fri]
excludes: [sat, sun]
add_holidays:
- '2019-09-02'
- '2019-11-28'
- '2019-12-24'
- '2019-12-25'
- '2020-01-01'
- '2020-05-25'
- '2020-07-03'
- '2020-09-07'
- '2020-11-26'
- '2020-12-25'
Nafis
November 24, 2019, 4:32pm
19
Yes, it works now.
removed from sensor.yaml, entered in configuration.yaml, now everything is fine.
thanks friends!