Closed gkathan closed 6 months ago
As far as I understand the module, a hash mode is not supported yet. Each variable can provide a value and optionally a few attributes. Then this is configured like
var:
tvbox_channel_1:
friendly_name: "TV Channel 1"
initial_value: "orf1"
attributes:
id: 11
tvbox_channel_2:
friendly_name: "TV Channel 2"
initial_value: "orf2"
attributes:
id: 12
Or this is what you are looking for: https://github.com/snarky-snark/home-assistant-variables/issues/48#issuecomment-782387905
hi, probably I am too stupid ;-) but what I need is to set a variable in configuration.yaml which acts like a hashmap - a collection / array of key - value pairs:
Logger: homeassistant.config Source: config.py:1335 First occurred: 02:55:32 (1 occurrences) Last logged: 02:55:32
Invalid config for 'var' at configuration.yaml, line 117: expected a dictionary for dictionary value 'var->tvbox_channels', got [{'name': 'orf1', 'id': 11}, {'name': 'orf2', 'id': 12}, {'name': 'orf3', 'id': 22}, {'name': '3sat', 'id': 48}, {'name': 'arte', 'id': 47}, {'name': 'atv', 'id': 13}, {'name': 'pro7', 'id': 17}, {'name': 'comedycentral', 'id': 44}, {'name': 'automotorsport', 'id': 110}, {'name': 'zdfinfo', 'id': 57}], please check the docs at https://github.com/snarky-snark/home-assistant-variables/blob/master/README.md
any advice? thänx in advance