Remove sun platform
It isn't in use yet
This commit is contained in:
@@ -137,34 +137,6 @@ select:
|
|||||||
disabled_by_default: false
|
disabled_by_default: false
|
||||||
icon: mdi:dip-switch
|
icon: mdi:dip-switch
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: sun_elevation
|
|
||||||
name: Sun Elevation
|
|
||||||
platform: sun
|
|
||||||
type: elevation
|
|
||||||
internal: true
|
|
||||||
|
|
||||||
- id: zone_home_latitude
|
|
||||||
platform: homeassistant
|
|
||||||
entity_id: ${zone_home}
|
|
||||||
attribute: latitude
|
|
||||||
internal: false
|
|
||||||
on_value:
|
|
||||||
- lambda: if (!isnan(x)) sun_entity->set_latitude(x);
|
|
||||||
|
|
||||||
- id: zone_home_longitude
|
|
||||||
platform: homeassistant
|
|
||||||
entity_id: ${zone_home}
|
|
||||||
attribute: longitude
|
|
||||||
internal: false
|
|
||||||
on_value:
|
|
||||||
- lambda: if (!isnan(x)) sun_entity->set_longitude(x);
|
|
||||||
|
|
||||||
sun:
|
|
||||||
id: sun_entity
|
|
||||||
latitude: ${latitude}
|
|
||||||
longitude: ${longitude}
|
|
||||||
|
|
||||||
text_sensor:
|
text_sensor:
|
||||||
- id: tx_fw_version
|
- id: tx_fw_version
|
||||||
name: Firmware version
|
name: Firmware version
|
||||||
|
|||||||
@@ -13,23 +13,6 @@
|
|||||||
---
|
---
|
||||||
api:
|
api:
|
||||||
id: api_server
|
id: api_server
|
||||||
actions:
|
|
||||||
- action: set_float
|
|
||||||
variables:
|
|
||||||
component: string
|
|
||||||
val: float
|
|
||||||
then:
|
|
||||||
- lambda: |-
|
|
||||||
ESP_LOGD("core_api", "Set float:");
|
|
||||||
ESP_LOGD("core_api", " Component: %s", component.c_str());
|
|
||||||
ESP_LOGD("core_api", " Value: %f", val);
|
|
||||||
if (!isnan(val)) {
|
|
||||||
if (component == "latitude" && val >= -90 && val <= 90) {
|
|
||||||
sun_entity->set_latitude(val);
|
|
||||||
} else if (component == "longitude" && val >= -180 && val <= 180) {
|
|
||||||
sun_entity->set_longitude(val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- id: !extend button_action
|
- id: !extend button_action
|
||||||
@@ -54,5 +37,4 @@ script:
|
|||||||
{"component", component},
|
{"component", component},
|
||||||
{"event", event},
|
{"event", event},
|
||||||
});
|
});
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user