Skip to content

Commit

Permalink
Prettify yaml (test fixtures)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed Mar 30, 2022
1 parent 6cc2c92 commit 6d627cd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions tests/components/bayesian/fixtures/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ binary_sensor:
- platform: bayesian
prior: 0.1
observations:
- entity_id: 'switch.kitchen_lights'
- entity_id: "switch.kitchen_lights"
prob_given_true: 0.6
prob_given_false: 0.2
platform: 'state'
to_state: 'on'
platform: "state"
to_state: "on"
name: test2
1 change: 0 additions & 1 deletion tests/components/modbus/fixtures/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ modbus:
host: "testHost"
port: 5001
name: "testModbus"

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ sensor:
resource: "http://localhost"
method: GET
name: rollout

9 changes: 5 additions & 4 deletions tests/components/template/fixtures/broken_configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ sensor:
combined_sensor_energy_usage:
friendly_name: Combined Sense Energy Usage
unit_of_measurement: kW
value_template: '{{ ((states(''sensor.energy_usage'') | float) + (states(''sensor.energy_usage_2'')
| float)) / 1000 }}'
value_template:
"{{ ((states('sensor.energy_usage') | float) + (states('sensor.energy_usage_2')
| float)) / 1000 }}"
watching_tv_in_master_bedroom:
friendly_name: Watching TV in Master Bedroom
value_template: '{% if state_attr("remote.alexander_master_bedroom","current_activity")
value_template:
'{% if state_attr("remote.alexander_master_bedroom","current_activity")
== "Watch TV" or state_attr("remote.alexander_master_bedroom","current_activity")
== "Watch Apple TV" %}on{% else %}off{% endif %}'

Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

10 changes: 6 additions & 4 deletions tests/components/template/fixtures/sensor_configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ sensor:
host: 192.168.210.25
community: public
accept_errors: true
value_template: '{{ ((value | int) / 1000) | float | round(3) }}'
value_template: "{{ ((value | int) / 1000) | float | round(3) }}"
scan_interval: 900
- platform: template
sensors:
combined_sensor_energy_usage:
friendly_name: Combined Sense Energy Usage
unit_of_measurement: kW
value_template: '{{ ((states(''sensor.energy_usage'') | float) + (states(''sensor.energy_usage_2'')
| float)) / 1000 }}'
value_template:
"{{ ((states('sensor.energy_usage') | float) + (states('sensor.energy_usage_2')
| float)) / 1000 }}"
watching_tv_in_master_bedroom:
friendly_name: Watching TV in Master Bedroom
value_template: '{% if state_attr("remote.alexander_master_bedroom","current_activity")
value_template:
'{% if state_attr("remote.alexander_master_bedroom","current_activity")
== "Watch TV" or state_attr("remote.alexander_master_bedroom","current_activity")
== "Watch Apple TV" %}on{% else %}off{% endif %}'

Expand Down

0 comments on commit 6d627cd

Please sign in to comment.