Hi all
newbie question
I have a IOT4SH01DS temperature sensor, I can read the temp with
mosquitto_sub -t /iot4/IOT4SH01DS_A03625/temperature
but I’m struggling with homeassistant at the moment
my configuration.yaml :-
Hi
First of all the blue bar you refer does not function
If I select the “</>” icon all I get is this
" indented 4 spaces"
If it clicked on a reply it functions as it should.
I’m using a chromium browser on linux mint 19
All the other lists I subscribe to, clicking on the same icon produces a code box which can be pasted in to.
So all I can do is either go away and give up on the list, or as I did indent and hope it can be read without complaints.
As I said the error was an invalid config mqtt message
Luckily I’ve just found what the problem was,
For some reason after editing using “joe” , there was a non-printable character with was interpreted
as “-” at the start of the line, on line 1 and line 64.
I copied configuration.yaml~ ( the back up file ) across and now getting a reading from the sensor
I’m just trying to help you. If you post other code on the forum and want help you will need to figure out how to post properly or you will only get a limited amount of help.
The way it works is that you copy your code snippet from your configuration.yaml file, paste it into the reply box, then you need to highlight all of the code you just pasted in and then click on the “</>”. Every once in a while it may do something funky with the first line so you may have to play with that but it’s fairly rare that you have to mess with it.
as far as the error I was asking for was for you to copy the error messages from your home-assistant.log and paste it here. Many times the error will give you clues that others can use to help you troubleshoot issues.
I have no idea what “joe” means so you must not have included that in your original post explaining the problem. Or where the reference to “line 1 and line 64” came from. Somehow I’ll wager those were somewhere in the error message that I intended for you to copy here.
Hi Finity
I’m afraid you missed the point
I’m used to using code boxes on other lists.
but on this forum if I CLICK on the </> all it does it to put a message on the next line saying its indented 4 spaces., tottaly different to this site
I’m still getting a lot of problems with configuration
the darksky weather works but darksky sensor doesn’t, nor does the YR sensor
The config file is very fussy on indents when nesting , the documentation say 2 spaces , but the virgin file doesn’t use two spaces.
Is it 2 spaces to the “-” or what , its very unclear ., It doesn’t seem to nest in the same way as writting in C
can I use “sensor.water_temp” instead of “sensor”
I’ve looked thru previous topics, but cant find any that relate to different types of sensor, ie weather and temperature
thanks
richard
What do you mean when you say it “doesn’t work”? What are you seeing and what are you expecting to see?
And yes, YAML is very picky on indentations/syntax/whitespacing. That’s why posting your code in the proper format is so important to be able to allow others to see if there are errors in your syntax.
Hey, just checked the component decription and monitored_conditions is not optional.
Your syntax should be good.
What result does the config check show?
Right now you only have one space there. It should be two as I’ve got above.
As far as I know there is no special delimiter between platforms of sensors if that what you are asking. As far as I know you can mix and match sensors in the section as long as each sensor is properly indented and starts with a "- ".
Yeah, I just noticed that this time he doesn’t have the “monitored_conditions” included while before above he did. And before I think the syntax should have been good but this time there was a missing space before the sensors.
well it was until I added the last two lines, where should they go , I’ve tried a few positions and its not happy, If you can cast your word of wisdom, I should have got the hang of itm for now.
I can’t say whether it’s from the edge or something else because it depends on where the new line is:
usually a good bet is if something needs indented it is indented 2 spaces from the line directly above but then you also have to follow the list rules.
So basically all the sensors are a list so they get the same indent level. and all options: under sensor 3 are a list so they all get the same indent level.
But be aware that not all lists are truly lists. For example scripts and groups aren’t lists they’re names so they don’t need the "- " in front to split them:
script:
turn_off_sunroom_fan:
alias: Sunroom Fan
sequence:
- service: switch.turn_on
entity_id: switch.sunroom_fan_0
close_gdn:
alias: Close the North Garage Door
sequence:
- condition: state
entity_id: binary_sensor.garage_door_north_position_sensor
state: 'on'
- service: switch.turn_on
entity_id: switch.garage_door_north_operator_switch
Don’t ask what the rhyme or reason is behind that convention because I don’t have a clue.