ESPresence, OBK, and other updates

This commit is contained in:
root
2023-10-20 13:27:48 +13:00
parent 0c38ec96f0
commit 910a908880
26 changed files with 1112 additions and 42 deletions

27
packages/ev_charging.yaml Normal file
View File

@@ -0,0 +1,27 @@
input_select:
leaf_ev_charging_mode:
icon: mdi:ev-plug-type1
name: Leaf EV Charge Mode
initial: "Normal (Offpeak)"
options:
- "Normal (Offpeak)"
- "Offpeak until charged"
- "1hr top-up now"
- "Charge now until full"
- "Stop charging now"
automation:
- id: set_the_leaf_ev_charging_mode
alias: Set the Leaf EV Charging MOde
trigger:
entity_id: input_select.leaf_ev_charging_mode
platform: state
action:
service: mqtt.publish
data:
topic: viewroad-status/evcharging/leaf-chargemode
payload:
'{% set mapping = { "Normal (Offpeak)":"normal", "Offpeak until charged":"offpeak-full",
"1hr top-up now":"boost", "Charge now until full":"now-full", "Stop charging now":"stop" } %} {% set dta = trigger.to_state.state %}
{{ mapping[dta] }}
'