@toggledbits thanks again! I did left some stuff out, as I thought they were not relevant for the questions at hand, as I was not trying to present how to configure a particular device, but trying to learn how to do something a bit more "advanced" (and that stuff would be visible to others as well).
Actually only thing I left out from my "daikin_command" template was power_switch:
daikin_command:
# also nothing here before capabilities
capabilities: [ "hvac_heating_unit", "power_switch", "value_sensor" ]
primary_attribute: hvac_heating_unit.setpoint
events:
"state/%friendly_name%":
"power_switch.state":
json_payload: true
if_expr: '! isnull( payload?.power )'
expr: "payload.power ? 'on' : 'off'"
...
For clarity, here's that "payload.cmd" final solution (with some extra logic):
requires: [cmd]
events:
"state/%friendly_name%":
"power_switch.state":
json_payload: true
expr: 'config.cmd == "swingv" || config.cmd == "swingh" ? payload.swing : payload[config.cmd]'
About "hvac_blower_unit.mode", I think you had forgotten "expr", so I added that, and also "map_default" in case something changes in the other end, and this would continue to work. Also those mapping values were the other way around (something that you could not know).
"hvac_blower_unit.mode":
json_payload: true
if_expr: '! isnull( payload?.fan )'
expr: "payload.fan"
map:
auto: "Auto"
night: "Indoor quiet"
low: 1
lowMedium: 2
medium: 3
mediumHigh: 4
high: 5
map_default: payload.fan