default_config:
tts:
platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
duckdns:
domain: casamia
access_token: miotoken
http:
ssl_certificate: /home/homeassistant/dehydrated/certs/casamia.duckdns.org/fullchain.pem
ssl_key: /home/homeassistant/dehydrated/certs/casamia.duckdns.org/privkey.pemsensor
I’m not able to understand and resolve the error line given by home assistant
Can you format your code correctly using the code block button please
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
duckdns:
domain: casamia
access_token: mytoken
http:
ssl_certificate: /home/homeassistant/dehydrated/certs/casamia.duckdns.org/fullchain.pem
ssl_key: /home/homeassistant/dehydrated/certs/casamia.duckdns.org/privkey.pemsensor
- platform: cert_expiry
host: casabusato.duckdns.org
port: 8123
sensor:
- platform: template
sensors:
certificate_expiry:
friendly_name: "Scadenza certificato"
value_template: "{{ (( as_timestamp(states('sensor.cert_expiry_timestamp_casamia_duckdns_org_8123')) | int - as_timestamp(now()) | int ) /60/60/24 ) | int }}"
unit_of_measurement: "Giorni"
icon_template: mdi:certificate
spotify:
client_id: myid
client_secret: mysecret
api:
alexa:
smart_home:
hacs:
token: mytoken
Looks like your missing a space before the - on the line below tts:
petro
(Petro)
April 2, 2021, 11:48am
6
The problem is your -platfrom: cert_expiry. That’s not a valid configuration for those fields also, its now configured through the UI.
petro
(Petro)
April 2, 2021, 11:49am
7
spacing doesn’t matter as long as all fields are in line below the -. YOu can use 2, 3 1, or zero spaces
This is the full configuration.yaml
petro
(Petro)
April 2, 2021, 11:49am
9
Yes as I said, this is wrong and not valid.
The cert expiry section doesn’t belong in http
EliaBusato
(Elia Busato)
April 2, 2021, 11:50am
11
http:
ssl_certificate: /home/homeassistant/dehydrated/certs/casamia.duckdns.org/fullchain.pem
ssl_key: /home/homeassistant/dehydrated/certs/casamia.duckdns.org/privkey.pemsensor
- platform: cert_expiry
host: casamia.duckdns.org
port: 8123
petro
(Petro)
April 2, 2021, 11:51am
12
Yes… it’s wrong, remove the cert_expiry lines
1 Like
There’s also sensor wrongly appended to you SSL cert url
EliaBusato
(Elia Busato)
April 2, 2021, 11:53am
14
I’ve deleted it, but the problem persist
petro
(Petro)
April 2, 2021, 11:53am
15
I’m assuming you have something else wrong, post the config again
EliaBusato
(Elia Busato)
April 2, 2021, 11:54am
17
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
duckdns:
domain: casamia
access_token: 0e97ca68-2a0f-49c6-a69a-427c5abf5d9b
http:
ssl_certificate: /home/homeassistant/dehydrated/certs/casabusato.duckdns.org/fullchain.pem
ssl_key: /home/homeassistant/dehydrated/certs/casabusato.duckdns.org/privkey.pemsensor
host: casamia.duckdns.org
port: 8123
sensor:
- platform: template
sensors:
certificate_expiry:
friendly_name: "Scadenza certificato"
value_template: "{{ (( as_timestamp(states('sensor.cert_expiry_timestamp_casamia_duckdns_org_8123')) | int - as_timestamp(now()) | int ) /60/60/24 ) | int }}"
unit_of_measurement: "Giorni"
icon_template: mdi:certificate
spotify:
client_id: ...
client_secret: ...
api:
alexa:
smart_home:
hacs:
token: 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
petro
(Petro)
April 2, 2021, 11:56am
18
You left part of the cirt_expiry configuration there…
as @samnewman86 said, you added extra ‘sensor’ at the end of your pem file
EliaBusato
(Elia Busato)
April 2, 2021, 11:56am
19
the problem appeared when I’ve opened with visual code the configuration.yaml for the first time, and asked me to correct some code line, as I did, everything just stopped working.
The point is that with this configuration everything worked just fine before
Before it all got changed you mean
petro
(Petro)
April 2, 2021, 11:57am
21
You didn’t read the breaking changes. You’re suppossed to switch to the UI for the cert_expiry integration. I feel like a broken record here
1 Like